if (inweo.get("inweo.widgets.window") != true) {
	inweo.set("inweo.widgets.window", true);
	inweo.widgets.window = inweo.core.widget.extend({
		initialize: function() {
			inweo.require("resizer");
			inweo.require("label");
			
			this.widget = new Element("div");
			this.widget.addClass("window");

			this.bar = new Element("div");
			this.bar.addClass("windowBar");
			this.bar.injectInside(this.widget);

			this.closeButton = new Element("div");
			this.closeButton.addClass("windowBarButton");
			this.closeButton.addClass("windowBarButtonClose");
			this.closeButton.setText("X");
			this.closeButton.injectInside(this.bar);

			this.resizeButton = new Element("div");
			this.resizeButton.addClass("windowBarButton");
			this.resizeButton.addClass("windowBarButtonResize");
			this.resizeButton.setText("[]");
			this.resizeButton.injectInside(this.bar);

			this.minizeButton = new Element("div");
			this.minizeButton.addClass("windowBarButton");
			this.minizeButton.addClass("windowBarButtonMinize");
			this.minizeButton.setText("_");
			this.minizeButton.injectInside(this.bar);

			this.title = new inweo.widgets.label();
			this.title.widget.addClass("windowTitle");
			this.title.widget.injectInside(this.bar);

			this.content = new Element("div");
			this.content.addClass("windowContent");
			this.content.injectInside(this.widget);

			this.resizer = new inweo.widgets.resizer(this.widget);
			
			this.resizer.widget.injectInside(document.body);
			this.resizer.render();

			new Drag.Move(this.resizer.widget, {
				handle: this.bar
			});
		}
	});
}